package com.kjsdfgk.hjmdsf.history.mvp.ui.activity;

import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.kjsdfgk.hjmdsf.app.entity.HistoryItem;
import com.kjsdfgk.hjmdsf.app.entity.WebPhoto;
import com.lksdkjs.live.R;

public class HistoryAdapter extends BaseQuickAdapter<HistoryItem, BaseViewHolder> {
    public HistoryAdapter(int layoutResId) {
        super(layoutResId);
    }
    @Override
    protected void convert(BaseViewHolder helper, HistoryItem item) {

        TextView title = helper.getView(R.id.title);
        title.setText(item.title);
        TextView date = helper.getView(R.id.time);
        date.setText(item.time);
        ImageView simpleDraweeView = helper.getView(R.id.web_img);

        Glide.with(helper.itemView).load(item.img).placeholder(R.mipmap.img_loading).transition(new DrawableTransitionOptions().crossFade(300)).into(simpleDraweeView);


    }
}
